package org.paul.tourism

import android.content.Context
import android.util.AttributeSet
import android.view.View

class BaseView : View, NetChangeAudience {
    override fun offLine() {
        TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
    }

    override fun onLine() {
        TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
    }

    constructor(context: Context) : super(context) {}

    constructor(context: Context, attrs: AttributeSet?) : super(context, attrs) {}

    constructor(context: Context, attrs: AttributeSet?, defStyleAttr: Int) : super(context, attrs, defStyleAttr) {}

    constructor(context: Context, attrs: AttributeSet?, defStyleAttr: Int, defStyleRes: Int) : super(context, attrs, defStyleAttr, defStyleRes) {}

    override fun onDetachedFromWindow() {
        super.onDetachedFromWindow()
        Tourism.instance().unSubscribeNetChange(this)
    }

    override fun onAttachedToWindow() {
        super.onAttachedToWindow()
        Tourism.instance().subscribeNetChange(this)
    }


}